Video-information encoding method and video-information decoding method

ABSTRACT

A video-information encoding apparatus and decoding apparatus with a guarantee of a fixed processing time. By limiting the amount of data to be input into/output from a CABAC encoding unit and decoding unit on a unit-of-encoding basis, such as one picture, slice, macroblock or block, and by encoding uncompressed video data, it is possible to provide a video-information encoding apparatus and decoding apparatus with a guarantee of a fixed processing time. Thereby, an apparatus with a guarantee of the processing time can be mounted.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of U.S. application Ser.No. 12/879,411, filed on Sep. 10, 2010, which is a continuation of U.S.application Ser. No. 10/524,214, filed on Feb. 10, 2005, now U.S. Pat.No. 7,796,690, issued on Sep. 14, 2010. This application is based uponand claims the benefit of priority to International Application No.PCT/JP03/12969, filed on Oct. 9, 2003 and from the prior Japanese PatentApplication No. 2002-332901 filed on Oct. 10, 2002. The entire contentsof each of these documents are incorporated herein by reference.

BACKGROUND OF THE INVENTION Summary of the Invention

The present invention, like recently developed standard JVT (ITU-T Rec.H. 264 | ISO/IEC 14496-10 AVC), relates to a method, apparatus, andprogram for encoding video information, and a method, apparatus, andprogram for decoding video information used when video information(bitstream) is received through a network medium such as satellitebroadcasting, a cable TV or the Internet or when video information isprocessed on a storage medium such as an optical disc, a magnetic diskor a flash memory, the video information compressed through orthogonaltransformation such as discrete cosine transform or the Karhunen Loevetransform, and motion compensation.

Discussion of the Background

Recently, for both of broadcasting stations providing information andhomes receiving the information, it has become common to use devicesthat adopt a method such as MPEG to compress video information throughorthogonal transformation such as discrete cosine transform, and motioncompensation, utilizing the redundancy of the video information, forefficient information transmission and storage, by taking the videoinformation as digital information.

Especially, the MPEG2 (ISO/IEC 13818-2) is defined as a general videoencoding method, and is widely used as an application for professionalsand for consumers since it can treat interlaced images and progressivelyscanned images, and standard resolution video and high resolution video.By using the MPEG2 compression method, a high compression rate and highquality of video can be realized, for example, by assigning interlacedimages of standard resolution of 720×480 pixels a bit rate of 4 to 8Mbps, or by assigning progressively scanned images of high resolution of1920×1088 pixels a bit rate of 18 to 22 Mbps.

The MPEG2 mainly encodes high quality video for broadcasting and doesnot cope with a bit rate lower than that used by the MPEG1, that is, anencoding method with a high compression rate. However, it was expectedthat popularization of mobile terminals would bring high needs of suchan encoding method, and therefore the MPEG4 encoding system wasstandardized. As to a video encoding method, its standard was approvedas international standard ISO/IEC 14496-2 in December 1998.

In addition, recently, with video encoding for video conferencing as afirst desired usage, a method called JVT (ITU-T Rec. H.264 | ISO/IEC14496-10 AVC) is being standardized. Compared with conventional encodingsystems such as MPEG2 and MPEG4, it is known that the JVT can providehigher encoding efficiency although it requires more operations forencoding and decoding.

FIG. 8 shows a general construction of a video-information encodingapparatus that realizes video compression with orthogonal transformationsuch as the discrete cosine transform or the Karhunen Loeve transform,and motion compensation. As shown in FIG. 8, a video-informationencoding apparatus 100 is composed of an A/D converter 101, a screenrearrangement buffer 102, an adder 103, an orthogonal transformationunit 104, a quantization unit 105, a reverse encoding unit 106, astorage buffer 107, a dequantization unit 108, an inverse orthogonaltransformation unit 109, a frame memory 110, a motionprediction/compensation unit 111, and a rate control unit 112.

Referring to FIG. 8, the A/D converter 101 converts an input videosignal into a digital signal. The screen rearrangement buffer 102rearranges the frames according to the GOP (Group of Pictures) of videocompression information given from the A/D converter 101. The screenrearrangement buffer 102 gives the orthogonal transformation unit 104video information on the entire frames of images to be intra-encoded(within image encoded). The orthogonal transformation unit 104 appliesan orthogonal transformation, such as the discrete cosine transform orthe Karhunen Loeve transform, to the video information and gives atransform coefficient to the quantization unit 105. The quantizationunit 105 performs a quantization process on the transform coefficientgiven from the orthogonal transformation unit 104.

The reverse encoding unit 106 determines an encoding mode based on thequantized transform coefficient, which was supplied by the quantizationunit 105, and a quantization scale, and applies variable-length codingor reverse encoding such as arithmetic coding to the encoding mode tothereby create information to be inserted in the header part in eachunit of encoded video. The encoded encoding mode is given and storedinto the storage buffer 107. This encoded encoding mode is output asvideo compression information.

In addition, the reverse encoding unit 106 applies variable-lengthcoding or reverse encoding, such as arithmetic coding, to the quantizedtransform coefficient and gives the encoded transform coefficient to thestorage buffer 107 to store it therein. This encoded transformcoefficient is output as video compression information.

The quantization unit 105 operates under the control of the rate controlunit 112. The quantization unit 105 gives the quantized transformcoefficient to the dequantization unit 108, which performsdequantization on the transform coefficient. The inverse orthogonaltransformation unit 109 creates decoding video information by applyingan inverse orthogonal transformation process to the dequantizedtransform coefficient, and gives the information to the frame memory 110to store it therein.

On the other hand, the screen rearrangement buffer 102 gives the motionprediction/compensation unit 111 video information on an image to beinter-encoded (between images encoded). The motionprediction/compensation unit 111 retrieves video information used forreference simultaneously from the frame memory 110 and performs a motionprediction/compensation process to create reference video information.The motion prediction/compensation unit 111 gives the reference videoinformation to the adder 103, which then converts the reference videoinformation into a differential signal from the video information. Atthe same time, the motion prediction/compensation unit 111 gives motionvector information to the reverse encoding unit 106.

The reverse encoding unit 106 determines an encoding mode based on thequantized transform coefficient, which was given from the quantizationunit 105, the quantization scale, the motion vector information givenfrom the motion prediction/compensation unit 111, etc., and appliesvariable-length coding or reverse encoding such as arithmetic coding tothe encoding mode, to thereby create information to be inserted into theheader in a unit of encoded video. The encoded encoding mode is given tothe storage buffer 107 to be stored therein. The encoded encoding modeis output as video compression information.

The reverse encoding unit 106 applies variable-length coding or thereverse encoding process such as arithmetic coding to the motion vectorinformation to create information to be inserted in the header part in aunit of encoded video.

In the inter-encoding, video information to be input into the orthogonaltransformation unit 104 is a differential signal obtained by the adder103, which is different from the intra-encoding. Since other processesare the same as in the case of the video compression information to beintra-encoded, its explanation will be omitted.

Next, FIG. 9 shows a general construction of a video-informationdecoding apparatus corresponding to the aforementioned video-informationencoding apparatus 100. As shown in FIG. 9, the video informationdecoding apparatus 120 is composed of a storage buffer 121, a reversedecoding unit 122, a dequantization unit 123, an inverse orthogonaltransformation unit 124, an adder 125, a screen rearrangement buffer126, a D/A converter 127, a motion prediction/compensation unit 128, anda frame memory 129.

The storage buffer 121 temporarily stores input video compressioninformation, and then transfers the information to the reverse decodingunit 122. The reverse decoding unit 122 applies variable-length decodingor a process such as arithmetic decoding to the video compressioninformation based on the prescribed format of the video compressioninformation, obtains the encoding mode information from its header part,and gives the information to the dequantization unit 123. Similarly, thereverse decoding unit 122 obtains the quantized transform coefficientand gives it to the dequantization unit 123. In a case in which theframe has been subjected to the inter-encoding, the reverse decodingunit 122 decodes motion vector information stored in the header part ofthe video compression information as well, and gives the information tothe motion prediction/compensation unit 128.

The dequantization unit 123 dequantizes the quantized transformcoefficient supplied from the reverse decoding unit 122, and gives thetransform coefficient to the inverse orthogonal transformation unit 124.The inverse orthogonal transformation unit 124 applies inverseorthogonal transformation, such as inverse discrete cosine transform orinverse Karhunen Loeve transform, to the transform coefficient based onthe prescribed format of the video compression information.

In a case in which the frame has been subjected to the intra-encoding,on the other hand, the video information subjected to the inverseorthogonal transformation is stored in the screen rearrangement buffer126, and then is output after a D/A conversion process by the D/Aconverter 127.

In a case in which the frame has been subjected to the inter-encoding,the motion prediction/compensation unit 128 creates a reference imagebased on the motion vector information subjected to the reverse decodingand the video information stored in the frame memory 129, and gives theimage to the adder 125. The adder 125 adds this reference image and theoutput of the inverse orthogonal transformation unit 124. Since otherprocesses are performed in the same way to the case of the framesubjected to the intra-encoding, its explanation will be omitted.

Now, the reverse encoding unit 106 under the JVT will be described indetail. As shown in FIG. 10, the reverse encoding unit 106 under the JVTadopts one reverse encoding out of arithmetic coding called CABAC(Context-based Adaptive Binary Arithmetic Coding) and variable-lengthcoding called CAVLC (Context-based Adaptive Variable Length Coding), fora symbol such as mode information, motion information, and quantizedcoefficient information, which are input from the quantization unit 105and the motion prediction/compensation unit 111, and outputs videocompression information (bitstream). Based on CABAC/CAVLC selectioninformation in FIG. 10, it is judged which reverse encoding is used.This CABAC/CAVLC selection information is determined by thevideo-information encoding apparatus 100 and is output by being embeddedin a bitstream as header information.

First the CABAC system in the reverse encoding unit 106 is shown in FIG.11. As shown in FIG. 11, mode information, motion information, andquantized transform coefficient information input from the quantizationunit 105 and the motion prediction/compensation unit 111 are input intoa binarization unit 131 as multi-valued symbols. The binarization unit131 converts the multi-valued symbols into a binary symbol string of anarbitrary length under a predetermined rule. This binary symbol stringis input into a CABAC encoding unit 133, and the CABAC encoding unit 133applies binary symbol arithmetic coding to the input binary symbols, andoutputs the encoded resultant as a bitstream to the storage buffer 107.A Context operation unit 132 calculates Context based on the symbolinformation input to the binarization unit 131 and the binary symbolsoutput from the binarization unit 131, and inputs the Context to theCABAC encoding unit 133. A Context memory group 135 of the Contextoperation unit 132 stores Context which is updated, as occasion arises,during an encoding process, and the initial state of Context to be usedfor a reset.

Next, the CAVLC system in the reverse encoding unit 106 is shown in FIG.12. As shown in FIG. 12, mode information, motion information, andquantized transform coefficient information input from the quantizationunit 105 and the motion prediction/compensation unit 111 are input in aCAVLC encoding unit 140 as multi-valued symbols. Like thevariable-length coding adopted by the conventional MPEG, the CAVLCencoding unit 140 applies a variable-length coding table to the inputmulti-valued symbols, and outputs a bitstream. A Context storage unit141 stores information already encoded in the CAVLC encoding unit 140,for example, the number of coefficients of non-zero in blocks alreadyprocessed as well as in blocks being processed, the value of acoefficient encoded immediately before this time, and so on. The CAVLCencoding unit 140 is able to change a variable-length coding table to beapplied for symbols, based on information from the Context storage unit141. It should be noted that the Context storage unit 141 stores theinitial state of Context to be used for a reset as well. The outputbitstream is input into the storage buffer 107.

Similarly, the reverse decoding unit 122 under the JVT will be describedin detail. Similarly to the reverse encoding unit 106, the reversedecoding unit 122 under the JVT applies one reverse decoding out ofCABAC and CAVLC to an input bitstream, as shown in FIG. 13. By readingthe CABAC/CAVLC selection information embedded in the header informationof the input bitstream, one of CABAC and CAVLC is applied.

FIG. 14 shows the CABAC system in the reverse decoding unit 122. In FIG.14, a CABAC decoding unit 161 applies binary symbol arithmetic decodingto a bitstream input from the storage buffer 121, and outputs theresultant as a string of binary symbols. This string of binary symbolsis input into an inverse binarization unit 163, and the inversebinarization unit 163 converts the string of binary symbols intomulti-valued symbols under a predetermined rule. The multi-valuedsymbols to be output from the inverse binarization unit 163 are outputfrom the inverse binarization unit 163 to the dequantization unit 123and the motion prediction/compensation unit 128 as mode information,motion vector, and quantized coefficient information. A Contextoperation unit 162 calculates Context based on the string of binarysymbols input into the inverse binarization unit 163 and themulti-valued symbol output from the inverse binarization unit 163, andinputs the Context into the CABAC decoding unit 161. A Context memorygroup 165 of the Context operation unit 162 stores Context which isupdated, as occasion arises, during a decoding process, and the initialstate of Context to be used for a reset.

Next, the CAVLC system in the reverse decoding unit 122 is shown in FIG.15. As shown in FIG. 15, an input bitstream from the storage buffer 121is input into a CAVLC decoding unit 170. Like variable-length decodingadopted by the conventional MPEG, the CAVLC decoding unit 170 adopts avariable-length decoding table for the input bitstream and outputs modeinformation, motion information, and quantized transform coefficientinformation. These output information are input into the dequantizationunit 123 and the motion prediction/compensation unit 128. A Contextstorage unit 171 stores information already decoded in the CAVLCdecoding unit 170, for example, the number of coefficients of non-zeroin blocks already processed as well as blocks being processed, the valueof a coefficient decoded just before this time, and so on. The CAVLCdecoding unit 170 is able to change the variable-length decoding tableto be applied for symbols, based on information from the Context storageunit 171. It should be noted that the Context storage unit 171 storesthe initial state of Context to be used for a reset as well.

For specific operations of the CABAC shown in FIG. 11 and FIG. 14, anexplanation about the CABAC is written in Final Committee Draft ISO/IEO14496-10:2002 (section 9.2), the entire contents of which are herebyincorporated herein by reference.

SUMMARY OF THE INVENTION

The applicants of the present invention have recognized certaindrawbacks in the existing encoding and decoding systems, andimprovements that can be made therein, as now discussed.

When 1 picture is encoded in a video-information encoding apparatus 100,even any of 1 picture, slice, macroblock and block is considered as aunit of encoding, the number of symbols, included in the unit ofencoding, to be entered into the binarization unit 131 of FIG. 11 is notfixed since it depends on a video signal to be entered and encodingconditions.

In addition, the length of a binary data string to be output for onesymbol entered into the binarization unit 131 is unfixed as described insection 9.2.1 of JVT FCD. For example, as is clear from Table 9-20 insection 9.2.1.5 of JVT FCD, the length of a binary data string formb_type1 Symbol in I slice is 1 at a minimum (at the time ofIntra_(—)4×4), and is 6 at a maximum. Therefore, the length of binarydata output from the binarization unit 131 in response to one Symbol isalso unfixed.

For the above reasons, the number of pieces of binary data output fromthe binarization unit 131 in response to a symbol, included in a unit ofencoding, of an input video signal is unfixed, and therefore a largeamount of binary data may be possibly output from the binarization unit131, due to the input data and encoding conditions.

The binary data output from the binarization unit 131 is input into theCABAC encoding unit 133. However, since the CABAC encoding unit 133actually needs a processing time longer than one clock to process onepiece of input binary data, if a great number of pieces of binary dataare input into the CABAC encoding unit 133, a large processing time isaccordingly required. In addition, as described above, as the number ofpieces of binary data input into the CABAC encoding unit 133 is unfixed,the longest time for processing cannot be estimated.

Therefore, in a case in which the video-information encoding apparatus100 should have a guarantee of real-time processing and a fixedprocessing speed, it can not have the guarantee if a great number ofpieces of binary data is input into the CABAC encoding unit 133 or thenumber of pieces of binary data is unfixed.

In addition, a bit length output from the CABAC encoding unit 133 inresponse to a binary data string output from the binarization unit 131in response to one symbol is unfixed. This is because the CABAC controlsthe output bit length according to the occurrence probability of inputbinary data. As a result, one piece of binary data input into the CABACencoding unit 133 may be bitstream data of one bit or lower, orbitstream data of several bits, depending on its occurrence probability.

Since the CABAC encoding unit 133 actually needs a processing timelonger than one clock cycle to process one piece of bit data to beoutput, if a large number of pieces of bit data are output from theCABAC encoding unit 133, a long processing time is required and,accordingly, as a result a mounted encoding unit needs a largeprocessing time. In addition, as stated above, since the number ofpieces of bit data output from the CABAC encoding unit 133 is unfixed,it is difficult to estimate the longest time for processing.

Therefore, in a case in which the video-information encoding apparatus100 should have a guarantee of real-time processing and a fixedprocessing time, it can not have the guarantee if a large number ofpieces of bit data are output from the CABAC encoding unit 133 or thenumber of pieces of bit data is unfixed.

The matter in that the number of pieces of binary data or bit data to beinput to/output from the CABAC encoding unit 133 is unfixed in a unit ofencoding, such as 1 picture, slice of a picture, macroblock, or a block,and may became large prevents the guarantee of a fixed processing timein the unit of encoding.

Further, when 1 picture is decoded in the video-information decodingapparatus 120, even any of 1 picture, slice, macroblock, and block isconsidered as a unit of decoding, the number of bits of a bitstream,included in the unit of encoding, entered into the CABAC decoding unit161 is unfixed because it depends on an input bitstream.

Since the CABAC decoding unit 161 requires a processing time longer thanone clock cycle to process one piece of input bit data, if a greatnumber of pieces of bit data are input into the CABAC decoding unit 161,a large processing time is accordingly required. In addition, as statedabove, since the number of pieces of bit data input into the CABACdecoding unit 161 is unfixed, the slowest processing speed can not beestimated.

Therefore, in a case in which the video-information decoding apparatus120 should have a guarantee of real-time processing and a fixedprocessing time, it can not have the guarantee if a large number ofpieces of bit data are input into the CABAC decoding apparatus 161 orthe number of pieces of bit data is unfixed. Especially, as comparedwith the video-information encoding apparatus 100, in thevideo-information decoding apparatus 120, the real-time decoding anddisplay of video information are highly demanded. Therefore, the factthat real-time processing can not be guaranteed is a problem.

Accordingly, one object of the present invention is to address theabove-problem. In the present invention, considering the above problems,the amount of data to be input to/output from a CABAC encoding unit anddecoding unit is limited in a unit of encoding such as 1 picture, slice,macroblock or block, and a mechanism for the limitation is applied to avideo-information encoding apparatus and decoding apparatus, and itsbitstreams.

Further, in the present invention, considering the above problems,uncompressed video data is encoded and a mechanism for the encoding isapplied to a video-information encoding apparatus and decodingapparatus, and its bitstreams.

Still further, in the present invention, considering the above problems,the same method is applied to CAVLC as well as CABAC.

By limiting the amount of data to be input to/output from theaforementioned CABAC encoding unit and decoding unit and encodinguncompressed data, a video-information encoding apparatus and decodingapparatus can have a guarantee of a fixed processing time, and anapparatus with a guarantee of the processing time can be realized. Inaddition, similar effects can be obtained in CAVLC as well as CABAC.

BRIEF DESCRIPTION OF DRAWINGS

A more complete appreciation of the present invention and many of theattendant advantages thereof will be readily obtained as the samebecomes better understood by reference to the following detaileddescription when considered in connection with the accompanyingdrawings, wherein:

FIG. 1 shows an example of a construction of a video-informationencoding apparatus of the present invention;

FIG. 2 shows an example of a construction of a video-informationencoding apparatus of the present invention;

FIG. 3 shows an example of a construction of a video-informationencoding apparatus of the present invention;

FIG. 4 shows an example of a construction of a video-informationencoding apparatus of the present invention;

FIG. 5 shows an example of a construction of a video-informationencoding apparatus of the present invention;

FIG. 6 shows an example of a construction of a video-informationdecoding apparatus of the present invention;

FIG. 7 shows an example of a construction of macroblock processing unitof the present invention;

FIG. 8 shows an example of a construction of a backgroundvideo-information encoding apparatus;

FIG. 9 shows an example of a construction of a backgroundvideo-information decoding apparatus;

FIG. 10 shows an example of a construction of a variable-length codingunit in background JVT;

FIG. 11 shows an example of a construction of a CABAC encoding unit inbackground JVT;

FIG. 12 shows an example of a construction of a CAVLC encoding unit inbackground JVT;

FIG. 13 shows an example of a construction of a variable-length decodingunit in background JVT;

FIG. 14 shows an example of a construction of a CABAC decoding unit inbackground JVT; and

FIG. 15 shows an example of a construction of a CAVLC decoding unit inbackground JVT.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Embodiments of the present invention will be explained with reference tothe attached drawings hereinafter, in which like reference numeralsindicate identical or similar elements throughout.

FIG. 1 shows an embodiment of a video encoding apparatus 10 in thepresent invention. In the apparatus 10 of FIG. 1, video signals to beencoded are input, and an encoded bitstream is output. The apparatus 10is composed of an input buffer 11, a transform processing section 12, aCABAC processing section 13, a limitation control unit 14, and an outputbuffer 15. The input buffer 11 partitions input video into macroblocksand outputs a macroblock, and when the processing of the macroblock isfinished at the latter stage, outputs a next macroblock. The transformprocessing section 12 processes an input macroblock image, and outputsheader information and quantized coefficient information to the CABACprocessing section 13. Specifically, a parameter setting unit 16 setsheader information such as mode information and motion vectorinformation of a macroblock, and a quantization parameter, and outputsthe value (symbol) to a prediction unit 17, a DCT unit 18, aquantization unit 19, and the CABAC processing section 13. The parametersetting unit 16 can set and output header information of a slice andpicture, as well as header information of a macroblock, and theseinformation are referred to as header information altogether. Also, amotion compensation in the prediction unit 17, a DCT transform in theDCT unit 18, and a quantization process in the quantization unit 19 areapplied to input signals from their former stages by reference to aninput signal from the parameter setting unit 16.

In the CABAC processing section 13, header information and quantizedcoefficient information are input as symbol data, subjected toarithmetic coding, and output as bit data. Specifically, the inputsymbol data is transformed into a binary data string by a binarizationunit 20, and the binary data is entropy-coded by a CABAC encoding unit22 based on Context information from a Context operation unit 21. TheContext operation unit 21 updates Context based on the symbol data inputinto the binarization unit 20 and the binary data output from thebinarization unit 20, and also outputs the Context information to theCABAC encoding unit 22.

The limitation control unit 14 has a first counter for the number ofpieces of binary data input into the CABAC encoding unit 22 and a secondcounter for the number of pieces of output bit data (bit counter 25).The limitation control unit 14 increases the first counter by one everytime a binary data is input into the CABAC encoding unit 22, andincreases the second counter by one every time a bit data is output fromthe CABAC encoding unit 22. These counters reset to 0 every time theprocessing of the beginning of the macroblock starts. Thereby, thenumbers of pieces of input data and output data in/from the CABACencoding unit 22 can be counted.

When one or both of these counters shows a number exceeding a presetthreshold value, the limitation control unit 14 outputs a signal(hereinafter referred to as a “reencoding signal”) indicating that thedata to be encoded is invalid, to the output buffer 15, the Contextoperation unit 21, and the parameter setting unit 16. The parametersetting unit 16 which received the reencoding signal resets an encodingparameter so as not to exceed the threshold value, and performs areencoding process on macroblock data to be encoded. In addition, theContext operation unit 21 has a Context memory group 23, and thisContext memory group 23 stores Context which is updated, as required,during an encoding process and the initial state of Context which isused for a reset, as in the Context memory group 135 shown in FIG. 11 asa background art, and also can store the state of Context just beforethe data processing of a macroblock. Therefore, the Context operationunit 21 which received a reencoding signal rewrites the state of Contextbeing stored, to the value of Context stored in the memory newly added,thereby making it possible to restore the state of Context just beforethe update performed based on macroblock data to be encoded. Inaddition, the output buffer 15 which received the reencoding signaldeletes all of bit data of a macroblock to be encoded and storedinternally, and waits for an input of macroblock data encoded with a newencoding parameter. In addition, if any counter of the limitationcontrol unit 14 does not show a value exceeding the preset thresholdvalue when the encoding process of a target macroblock finishes, the bitdata of the target macroblock in the output buffer 15 can be output as abitstream.

In the apparatus 10 of FIG. 1 described above, reset of the counters ofthe limitation control unit 14 at the beginning of a macroblock meansthat the number of pieces of binary data to be input to the CABACencoding unit 22 and the number of pieces of bit data to be output aremonitored and limited on a macroblock basis, and by setting timing forthis reset on a block basis in a macroblock, the number of pieces ofdata can be monitored and limited on a block basis. Similarly, byperforming a reset on a slice basis, the number of pieces of data can bemonitored and limited on a slice basis, and by performing a reset on apicture basis, the number of pieces of data can be monitored and limitedon a picture basis. When a unit for managing and limiting the number ofpieces of data is changed, the Context memory group 23 of the Contextoperation unit 21 stores a Context value in a unit of encoding justbefore the change at the same time, and therefore the state in the unitof encoding just before the change is restored as the state of Context.In addition, bit data of the output buffer 15 is also deleted every unitof encoding.

Also, restoration to a predetermined initial value, which is stored inthe Context memory group 23, can be also performed, not to the Contextvalue in the unit of encoding just before the change, which is stored inthe Context memory group 23.

In the apparatus 10 of FIG. 1 described so far, although the limitationcontrol unit 14 has two counters, threshold values set in these counterscan be independently set to various values, only a data count of one ofthese two counters can be monitored and a data count of the other can beignored, or the limitation control unit 14 can be constructed withoutcounters.

In this apparatus 10, the maximum amount of data to be input into/outputfrom the CABAC encoding unit can be limited for one time macroblockprocessing, which allows the requested time for one time processing ofmacroblock to be used satisfactorily. In addition, a bitstream to bedecoded within a requested processing time can be output.

Now, FIG. 7 shows a unit, a macroblock processing unit, representing thetransform processing section 12 and the CABAC processing section 13 ofFIG. 1, for the following description. The macroblock processing unitdescribed below performs the same process as a unit in which thetransform processing unit 12 and the CABAC processing unit 13 of FIG. 1are connected in parallel.

In the apparatus 10 shown in FIG. 1, the transform processing section 12has to set a new encoding parameter and encode a target macroblock everytime the limitation control unit 14 outputs a reencoding signal, andfurther the counters of the limitation control unit 14 may exceed athreshold value repeatedly, due to data obtained by a re-set parameter.In this case, the encoding processes are successively performed on onemacroblock several times, which takes a long time to encode 1 picture.

As another embodiment of a video encoding apparatus in the presentinvention, an example in which a target macroblock is encoded inparallel with different parameters is shown in FIG. 2 as a secondembodiment.

In an apparatus 30 of FIG. 2, similarly to the apparatus 10 of FIG. 1,video signals to be encoded are input and an encoded bitstream isoutput. The apparatus 30 of FIG. 2 is composed of an input buffer 31,macroblock processing units 32-1 to 32-N capable of performing parallelencoding processes at N stages with N different encoding parameters,corresponding output buffers 33-1 to 33-N, a limitation control/routeselection unit 34, and a switcher 35.

In the apparatus 30 of FIG. 2, N different encoding parameters are setfor a macroblock to be encoded, and the encoding processes with theseencoding parameters are performed in parallel by the macroblockprocessing units 32-1 to 32-N, and their outputs are stored in theoutput buffers 33-1 to 33-N.

The limitation control/route selection unit 34 has two input/output datacounters (bit counter 36) for the CABAC encoding unit corresponding tothe macroblock processing units 32-1 to 32-N, and selects an encodingroute which does not make its counter exceed a threshold value andtherefore is the most efficient encoding route, out of the N parallelroutes, and selects a line for output from the switcher 35.

The detailed operation of the apparatus 30 of FIG. 2 and variations of aunit of encoding are the same as the apparatus 10 of FIG. 1.

In this apparatus 30, the maximum amount of data to be input into/outputfrom the CABAC encoder at the time of encoding can be limited, so thatthe requested encoding processing time can be used satisfactorily. Inaddition, a bitstream that can be decoded within a requested processingtime can be output.

Next, FIG. 3 shows another embodiment of a video encoding apparatus ofthe present invention. In this embodiment, in addition to the embodimentof FIG. 1, a route for uncompressed encoded data, that is for encodinguncompressed raw data of an input macroblock, is provided.

What is different between the apparatus 40 of FIG. 3 and the apparatus10 of FIG. 1 is that macroblock video data is input not only into amacroblock processing unit 41 but also into an uncompression encodingunit 43. The uncompression encoding unit 43 outputs data of input videoinformation which is not subjected to a transform process and entropycoding, that is raw data to the output buffer B 44. A limitationcontrol/route selection unit 45 manages the amount of data to be inputto/output from the CABAC encoder by using the bit counter 49, and if thedata being monitored exceeds a threshold value, the switcher 46 selectsan input from the output buffer B 44 for output, similar to thelimitation control unit 14 of FIG. 1. If the data does not exceed athreshold value, an output from either output buffer A 42 or outputbuffer B 44 can be selected.

In a case in which the limitation control/route selection unit 45selects the output buffer B 44, that is raw data, the Context operationunit of the macroblock processing unit 41 is informed of this matter,and the state just before the processing of the macroblock which wasprocessed as raw data is restored for the Context value of the Contextoperation unit, by using the Context value just before the macroblockwas processed, which is stored in the Context memory group.

Also, in restoration of Context when the macroblock is processed as rawdata, a predetermined initial state can be restored as well.

Data indicating whether a macroblock has been encoded as raw data or notis embedded into the header information of a bitstream to be output.

In a case in which raw data has been encoded, the CABAC encoding unitperforms the terminal process before outputting the raw data as abitstream.

In addition, the uncompression encoding unit 43 is not limited only toan uncompression encoding unit that outputs raw data, but can also beanother type of compression unit such as a DPCM encoding unit.

Other operations of the apparatus 40 of FIG. 3 and variations of a unitof encoding are the same as the apparatus 10 of FIG. 1.

In this apparatus 40, the maximum amount of data to be input into/outputfrom the CABAC encoding unit during encoding can be limited, so that arequested encoding processing time can be used satisfactorily. Inaddition, a bitstream that can be decoded within a requested processingtime can be output.

Next, FIG. 4 shows an apparatus 50 as another embodiment of a videoencoding apparatus of the present invention. In this embodiment, inaddition to the apparatus 30 of FIG. 2, a route for data to beuncompressed and encoded, that is for uncompressing and encoding rawdata of input macroblock, is provided.

Since operations of the common units of the apparatus of FIG. 4 with theapparatus of FIG. 2 are almost the same as the apparatus of FIG. 1, onlydifferent operations will be described. In this embodiment macroblockvideo data is input not only to macroblock processing units 51-1 to 51-Nbut also to an uncompression encoding unit 58. The uncompressionencoding unit 58 outputs data of input video information which is notsubjected to a transform process and entropy coding, that is raw data,to an output buffer B 59. A limitation control/route selection unit 53monitors a bit counter 55, as in the limitation control/route selectionunit 34 of FIG. 2, and if a bit counter for all routes 1-N (any of two)exceeds a preset threshold value, a signal selection unit 54 selects andoutputs an input from the output buffer B 59. And if the bit counter 55does not exceed the threshold value, the signal selection unit 54 canselect any of outputs from the output buffers A 52-1-A 52-N and theoutput buffer B 59.

Also, if the signal selection unit 54 selects raw data from the outputbuffer B 59, the state of Context just before a macroblock wasprocessed, which is stored in the Context memory group, is restored asthe state of Context of the Context operation units of the macroblockprocessing units 51-1 to 51-N. It should be noted that a predeterminedinitial value is able to be restored in this restoration, as describedfor the apparatus 10 of FIG. 1.

When the signal selection unit 54 selects an output buffer A 52-1 out ofthe output buffers A 52-1 to A 52-N, not raw data from the outputbuffer, on the contrary, the state of Context of the Context operationunit of the macroblock processing unit 51-1 is copied to the Contextoperation units of the other macroblock processing units 51-1 to 51-N.This is because all the states of the Context of the Context operationunits should be the same for the time when encoding of a next macroblockstarts. It should be noted that the uncompression encoding unit 58 isnot limited to only an uncompression processing unit that outputs rawdata, but can also be another type of compression unit such as a DPCMencoding unit.

Other detailed operations of the device 50 of FIG. 4 and variations of aunit of encoding are the same as the apparatus 10 of FIG. 1.

In this apparatus 50, the maximum amount of data to be input to/outputfrom the CABAC encoding unit can be limited during encoding, so that arequested encoding processing time can be used satisfactorily. Inaddition, a bitstream which can be encoded within a requested processingtime can be output.

Next, FIG. 5 shows an apparatus 60 using CAVLC, not CABAC, as thereverse encoding unit 106 of FIG. 8. This apparatus 60 has a CAVLCprocessing unit 63, instead of the CABAC processing unit 13 of theapparatus 10 of FIG. 1, and performs the same operation, except for theCAVLC processing unit 63 and the limitation control unit 64. Therefore,only the operation of the CAVLC processing unit 63 and the limitationcontrol unit 64 are described in this section.

In the CAVLC processing unit 63, header information and quantizedcoefficient information input as symbol data are variable-length encodedwith a variable length table, similar to a conventional MPEG2, and areoutput as bit data. The CAVLC processing unit 63 is composed of theCAVLC encoding unit and the Context storage unit described for thebackground art in FIG. 12, and the CAVLC processing unit 63 of thepresent invention can store the state of Context just before amacroblock is encoded to restore the state just before the macroblock isencoded when a reencoding signal arrivals, in addition to storinginformation encoded by the CAVLC encoding unit, for example, the numberof non-zero coefficients in each block of not only blocks beingprocessed but also blocks already processed and a value of a coefficientencoded just before this time, as in the background storage unit. TheCAVLC encoding unit can change a variable-length coding table to beapplied to a symbol, on the basis of information from this Contextstorage unit. Note that, the Context storage unit stores the initialstate of Context which is used for a reset.

The limitation control unit 64 has one counter (bit counter 75) for thenumber of pieces of bit data output from the CAVLC processing unit 63,and increases this counter by one every time the CAVLC processing unit 6outputs bit data. This counter resets to zero when the processing ofbeginning of a macroblock starts. Therefore, the number of pieces ofoutput data from the CAVLC processing unit 63 can be counted for eachmacroblock.

If this counter 75 exceeds a predetermined threshold value, thelimitation control unit 64 outputs a signal (referred to as a“reencoding signal” hereinafter), indicating that the data to be encodedis invalid, to an output buffer 65 and a parameter setting unit 66. Theparameter setting unit 66 that receives this reencoding signal re-setsan encoding parameter not to exceed the threshold value and performsreencoding on macroblock data to be encoded. In addition, the outputbuffer 65 that received the reencoding signal deletes all bit data ofthe macroblock to be encoded, being stored therein, and waits formacroblock data encoded with a new encoding parameter to be input.

Other detailed operations of the apparatus 60 of FIG. 5 and variationsof a unit of encoding are the same as the apparatus 10 of FIG. 1.

In this apparatus 60, the maximum amount of data output from the CAVALencoding unit can be limited for one-time macroblock processing, so thata requested macroblock processing time can be used satisfactorily. Inaddition, a bitstream which can be decoded within a requested processingtime can be output.

Further, in not only the apparatus of FIG. 1 but also the apparatuses ofFIG. 2 to FIG. 4, the CAVLC processing unit can be used instead of theCABAC processing unit and its operation is the same of that describednow in this embodiment. However, if a macroblock is encoded as raw data,the CAVLC processing unit does not have Context for the macroblock, sothat a method for updating Context when raw data is encoded should bedefined. Various kinds of methods can be applied, provided that anencoding apparatus and a decoding apparatus are synchronized with eachother. For example, the number of non-zero coefficients existing inblocks of a macroblock encoded as raw data can be taken to 15. In thisapparatus, the maximum amount of data to be output from the CAVLCencoding unit can be limited during encoding, so that a requestedencoding processing time can be used satisfactorily. In addition, abitstream which can be decoded within a requested processing time can beoutput.

Next, FIG. 6 shows an apparatus 80 of a video-information decodingapparatus of the present invention corresponding to the apparatuses ofFIG. 1 to FIG. 4. It should be noted that the apparatuses of FIG. 1 andFIG. 2 do not have an uncompression encoding unit and route for theunit, so that the apparatus 80 of FIG. 6 does not select a route to anuncompression decoding unit 88. In a case in which such a situation isclear, the uncompression decoding unit 88 and the route for the unit maynot be provided.

In the apparatus 80 of FIG. 6, a bitstream to be decoded is input and adecoded video signal is output. The apparatus 80 of FIG. 6 is composedof route selection units 81, 85, an encoding method judgement unit 84,an inverse transform processing unit 83, a CABAC processing unit 82, alimitation control unit 86, and the uncompression decoding unit 88.

First, when processing of each macroblock starts, the route selectionunits 81, 85 select a route of the CABAC processing unit 82. The CABACprocessing unit 82 decodes a symbol embedded into a bitstream,indicating whether a macroblock is raw data or not, before decoding themacroblock from the input bitstream, and if the encoding methodjudgement unit 84 judges that it is raw data, the route selection units81, 85 select a route of the uncompression decoding unit 88, to outputthe output from the uncompression decoding unit 88 as a video signal. Atthis time, the uncompression decoding unit 88 obtains video data throughfixed-length decoding. If the uncompression encoding unit 88 isselected, the state of Context of the Context operation unit 92 of theCABAC processing unit 82 may not be changed, may be initialized with apredetermined value, or may be changed with another rule, provided thatit is synchronized with the operation of the CABAC processing unit on anencoding apparatus side. In addition, at this time, a predictor used fordecoding a macroblock in the same picture to be decoded later is set toa predetermined value. For example, the motion vector of a macroblockuncompression-decoded is set to 0, and a macroblock type is set to anintra-encoding. This predictor value may have any value, provided thatit is synthesized with an encoding apparatus side.

If the encoding method judgement unit 84 selects that macroblock data isprocessed by the CABAC processing unit 82, an input bitstream is inputinto the CABAC processing unit 82 successively.

The CABAC processing unit 82 decodes and outputs header information andquantized coefficient information from an input bitstream, as symboldata. Specifically, the input bitstream is entropy-decoded by the CABACdecoding unit 90 based on Context information from the Context operationunit 92, and the output binary symbol string is transformed into symboldata by the inverse binarization unit 91. The Context operation unit 92updates Context based on the binary data input into the inversebinarization unit 91 and symbol data output from the inversebinarization unit 91, and outputs the Context information to the CABACdecoding unit 90. The operation of the CABAC processing unit 88 is underdescription of section 9.2 of JVT FCD noted in the background art.

The inverse transform processing unit 83 performs dequantization,inverse DCT, and motion compensation on input header information andquantized coefficient information, to decode and output video signals.

The limitation control unit 86 has a first counter for the number ofpieces of bit data to be input into the CABAC decoding unit 90 and asecond counter for the number of pieces of binary data output (bitcounter 13), and increases the first counter by one every time bit datais input into the CABAC decoding unit 90, and increases the secondcounter by one every time binary data is output from the CABAC decodingunit 90. These counters reset to zero when the processing of thebeginning of the macroblock starts. Thereby, the number of pieces ofinput data and output data of each macroblock in/from the CABAC decodingunit 90 can be counted.

If any of these counters exceeds a preset threshold value, thelimitation control unit 86 performs error processing. This errorprocessing can stop a decoding process once and start the decodingprocess again after a slice header or picture header arrives, or canonly make a warning and keep the decoding process going. In addition,the decoding process can be kept without the error processing.

In this apparatus 80, the amount of data to be input into/output fromthe CABAC decoding unit 90 during decoding can be controlled, so thateven the amount of data exceeding the maximum amount of data is input oroutput, the error processing or the like can be performed to use arequested decoding processing time satisfactorily.

In addition, the limitation control unit 86 is not necessarily mountedin the apparatus 80. In this case, the amount of data input and outputis not monitored in the CABAC encoding unit 90.

Also, although the apparatus 80 shows an embodiment of a videoinformation decoding apparatus of the present invention in a case inwhich CABAC is applied as entropy decoding, the CAVLC processing unitcan be used instead of the CABAC processing unit as shown in theembodiment for a video encoding apparatus. The description for itsactual processes will be omitted because the apparatus are very similar,as described in an embodiment for an encoding apparatus. Note that,similarly to the encoding apparatus, a method of updating Context inCAVLC for a case in which macroblock is encoded as raw data ispreviously defined.

Next, an embodiment of a bitstream encoded according to the presentinvention will be shown. As described so far, both data compressed in abitstream and raw data can be encoded in the present invention.Therefore, header information indicating whether the macroblock has beenencoded as raw data or not is added, which is followed by raw data orcompressed bit data. The information indicating whether a macroblock hasbeen encoded as raw data or not is different depending on a macroblocktype that is one of macroblock header information. Conversely, abitstream in the present invention can include macroblocks processed indifferent encoding methods.

Further, this specification shows a case in which information specifyingthe encoding method applied to a macroblock is added as headerinformation of the macroblock. If this specification information isadded in a slice header or a picture header, encoding methods can bemixed and the encoding methods can be specified on a slice or picturebasis.

If header information (for example, macroblock type) is encoded by CABACand the raw data (that is, a fixed-length bit string) is encoded, a bitsubjected to the terminal process of the CABAC is inserted in abitstream of the present invention before the raw data is encoded.

Further, in a case in which a bitstream is encoded by CABAC, thebitstream is composed of data that does not make any bit counter forinput and output of the CABAC encoding unit and decoding unit exceed apreset threshold value preset. In addition, in a case in which thebitstream is encoded, the bitstream is composed of data that does notmake any bit counter for output of CAVLC encoding unit and input ofdecoding unit exceed a preset threshold value. As a result, withbitstreams of the present invention, a video-information encodingapparatus and a video-information decoding apparatus have a guarantee ofa fixed decoding processing time.

By limiting the amount of data to be input to/output from a CABACencoding unit and decoding unit and by encoding uncompressed data, avideo-information encoding apparatus and decoding apparatus have aguarantee of a fixed processing time, thus making it possible to realizea device with a guarantee of the processing time. In addition, the sameeffects can be obtained in a case in which CAVLC is used instead ofCABAC.

The invention claimed is:
 1. A video encoding apparatus for encoding avideo signal, comprising: encoding means for performing an arithmeticencoding process using a context value on the video signal andgenerating a bit stream including raw data of the video signal in a unitof encoding; determining means for determining if the unit of encodingin the bit stream is encoded as the raw data; and controlling means for,when the determining means determines that the unit of encoding includesthe raw data, controlling the arithmetic encoding process so as to reusea same context value used in the arithmetic encoding process for a unitof encoding immediately before the unit of encoding that includes theraw data of the video signal.
 2. A video encoding method for encoding avideo signal, comprising: performing an arithmetic encoding processusing a context value on the video signal and generating a bit streamincluding raw data of the video signal in a unit of encoding;determining if the unit of encoding in the bit stream is encoded as theraw data; and controlling, when the determining determines that the unitof encoding includes the raw data, the arithmetic encoding process so asto reuse a same context value used in the arithmetic encoding processfor a unit of encoding immediately before the unit of encoding thatincludes the raw data of the video signal.
 3. A video encoding apparatusfor encoding a video signal, comprising: an encoder configured toperform an arithmetic encoding process using a context value on thevideo signal and to generate a bit stream including raw data of thevideo signal in a unit of encoding; a determining unit configured todetermine if the unit of encoding in the bit stream is encoded as theraw data; and a controller, including a processor, configured tocontrol, when the determining unit determines that the unit of encodingincludes the raw data, the arithmetic encoding process so as to reuse asame context value used in the arithmetic encoding process for a unit ofencoding immediately before the unit of encoding that includes theoutputting raw data of the video signal.
 4. The video encoding apparatusaccording to claim 3, wherein the controller reuses the same contextvalue used in the arithmetic encoding process for the unit of encodingimmediately before the unit of encoding that includes the outputting rawdata of the video signal for a unit of encoding immediately after theunit of encoding that includes the outputting raw data of the videosignal.